<!DOCTYPE html>
<html>
<head lang="en">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
    <link rel="shortcut icon" href="img/smlogo.png" type="image/x-icon">
    <meta charset="UTF-8">
    <title>Pulu</title>
    <link rel="stylesheet" href="css/index2.css"/>
    <style>
        .Cell .tc_image img {
            max-height: 33px;
            max-width: 33px;
        }
        .Cell .tc_inner{
            line-height: 30px;
            border-bottom:1px solid #ECECEC;
            margin:0;
            position: relative;
        }
        .relasimg{
            width:13px;
            height:13px;
        }
        .Cell .tc_image a{
            overflow: hidden;
            width:100%;
            height:100%;
            z-index: 1000;
        }
        .friends{
            position: relative;
            overflow: hidden;
            padding:15px 20px;
        }
        .friends>div{
            float: left;
        }
        div.imageplace{
            width:15%;
            max-width: 51px;
            border-radius:50%;
            overflow:hidden;
        }
        div.imageplace>a{
            width:100%;
            height:100%;
            display: block;
        }
        div.imageplace img{
            width:33px;
            height:33px;
        }
        div.innerplace{
            width:85%;
            height:33px;
        }
        #newsplace>.friends>.innerplace.wordplace{
            height:auto;
            margin-right:0;
        }
        #newsplace>.friends>.innerplace.wordplace a{
            font-size: 19px;
            color: #1D1D1D;
        }
        div.innerplace a{
            display: inline-block;
            height:33px;
            width: 100%;
            line-height: 33px;;
        }
        #newsplace div.innerplace img{
            width:20px;
            height:20px;
        }
        /*好友列表*/
        .section_header.section_header_gray{
            display:block;
        }
        .friends{
            border-bottom:1px solid #ECECEC;
        }
        #listplace{
            margin-bottom:15px;
        }
        /*右侧导航条*/
        .rightnav{
            position: fixed;
            right: 8px;
            top: 80px;
            z-index: 1000;
        }
        .rightnav>div {
            width: 27px;
            height: 14px;
            text-align: center;
        }
        .rightnav>div {
            color: #313131;
            font-size: 14px;
        }
        #chatpageheader{
            left:50%;
            transform: translateX(-50%);
        }
        #newfriendbtn,#biaoqian,#historynote,#strangepeople{
            cursor: pointer;
        }
        /*好友申请*/
        #newsplace>.friends{
            padding:9px 14px;
        }
        #newsplace>.friends>.imageplace{
            width:55px;
            height:55px;
            max-width:55px;
            float:left;
        }
        #newsplace>.friends>.innerplace{
            width:auto;
            float: none;
            margin-left:70px;
            margin-right:70px;
            font-size: 19px;
            color:#1D1D1D;
        }
        #newsplace>.friends>.innerplace p{
            text-overflow:ellipsis;
            white-space:nowrap;
            overflow:hidden;
            font-size: 15px;
            color:#959595;
        }
        #newsplace>.friends>.addfribtn{
            width:69px;
            height:35px;
            line-height: 35px;
            text-align: center;
            border: 1px solid #34A933;
            box-sizing: border-box;
            border-radius: 2px;
            float:right;
            margin-top:10px;
            font-size:16px;
            color:#fff;
            background: #1AAD19;
        }
        #newsplace>.friends>.haveadd{
            color:#B3B3B3;
            width:69px;
            height:35px;
            line-height: 35px;
            text-align: center;
            box-sizing: border-box;
            border-radius: 2px;
            float:right;
            margin-top:10px;
            font-size:16px;
        }
        #news,#friends{
            cursor: pointer;
        }
        #newsplace img {
            max-height: 100%;
            max-width: 100%;
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body class=" experiment-lookup_bar-on gating-feed_switcher_bar-on mweb  gating-new_mweb_header_logged_out-off" id="chatpage">
<div class="PageWrapper nonav">
    <div class=" has_toolbar">
        <!-- 头部-->
        <div class="Header ModalHeader">
            <div class="fixed_header">
                <div class="header_main">
                    <button class="mweb_modal_back_button" onclick="history.go(-1)"></button>
                    <div class="page_title unified" id="chatpageheader">
                        付费过的人
                    </div>
                </div>
            </div>
        </div>
        <!-- 好友申请信息-->
        <div id="newsplace">

        </div>
    </div>
</div>

<script src="js/jquery-1.11.3.js"></script>
<script src="js/jquery.cookie.js"></script>
<script>
    if(window.screen.availWidth>1000){
        $(".rightnav").css("right",(parseFloat(window.screen.availWidth)-1000)/2+8+"px");
    }
</script>
<script src="js/tohref.js"></script>
<script src="ftnjs/urlnote.js"></script>
<script>
    function loadPage(headImg,isfriend,realName,userId,nick){
        var payimg="<img src='img/af8.png'/>";
        if(headImg){
            payimg="<img src='"+imgurl+headImg+"'/>"
        }
        var rname="";
//        if(isfriend&&realName){
        if(realName){
            rname=" ("+realName+")";
        }
        $("#newsplace").append("<div class='friends'><div class='imageplace'><a href='otherpeoplepage.html?otherid="+userId+"'>"+payimg+"</a></div><div class='innerplace'><span class='tc_text'>"+nick+rname+"</span></div></div>");
    }
    function getanswer(type){
        if(/^\d+$/.test(eid)){

        }else{
            eid=eid.split("=")[1];
        }
        $.ajax({
            type:"get",
            url:getdetialurl+eid+"&userId="+id,
            //data:{"questionId":eid},
            datatype: "json",
            success:function(data){
                $("title").html(data.Data.title);
                exptitle=data.Data.title;
                euserid=data.Data.userId;
                if(type=="allpay"){
                    var len=data.Data.PayedUsers.length;
                    for(var i=0;i<len;i++){
                        loadPage(data.Data.PayedUsers[i].headImg,
                                data.Data.PayedUsers[i].isfriend,
                                data.Data.PayedUsers[i].realName,
                                data.Data.PayedUsers[i].userId,
                                data.Data.PayedUsers[i].nick);

                    }
                }
                else if(type=="allup"){
                    var len=data.Data.ExpUpUsers.length;
                    for(var i=0;i<len;i++){
                        loadPage(data.Data.ExpUpUsers[i].headImg,
                                data.Data.ExpUpUsers[i].isfriend,
                                data.Data.ExpUpUsers[i].realName,
                                data.Data.ExpUpUsers[i].userId,
                                data.Data.ExpUpUsers[i].nick);

                    }
                }
                else if(type=="redBag"){
                    var len=data.Data.RegBagUsers.length;
                    for(var i=0;i<len;i++){
                        loadPage(data.Data.RegBagUsers[i].headImg,
                                data.Data.RegBagUsers[i].isfriend,
                                data.Data.RegBagUsers[i].realName,
                                data.Data.RegBagUsers[i].userId,
                                data.Data.RegBagUsers[i].nick);

                    }
                }
            }
        });
    };
    function getqueanswer(){
        if(/^\d+$/.test(eid)){

        }else{
            eid=eid.split("=")[1];
        }
        //获得问题
        $.ajax({
            type:"get",
            url:getquedetialurl+eid,
            datatype: "json",
            success:function(data){
                var len=data.Data.QUpUsers.length;
                for(var i=0;i<len;i++){
                    var payimg="<img src='img/af8.png'/>";
                    if(data.Data.QUpUsers[i].headImg){
                        payimg="<img src='"+imgurl+data.Data.QUpUsers[i].headImg+"'/>"
                    }
                    var realName="";
//                    if(data.Data.QUpUsers[i].isfriend&&data.Data.QUpUsers[i].realName){
                    if(data.Data.QUpUsers[i].realName){
                        realName=" ("+data.Data.QUpUsers[i].realName+")";
                    }
                    $("#newsplace").append("<div class='friends'><div class='imageplace'><a href='otherpeoplepage.html?otherid="+data.Data.QUpUsers[i].userId+"'>"+payimg+"</a></div><div class='innerplace'><span class='tc_text'>"+data.Data.QUpUsers[i].nick+realName+"</span></div></div>");
                }
            }
        });
    }
    var eid;//截取的id
    if(/[0-9]/.test(location.href)){
        eid=(location.href).match(/[0-9]+/)[0];
        if(/allup/.test(location.href)){ //..................经验点赞
            $("#chatpageheader").html("点过赞的人");
            getanswer("allup");
        }
        else if(/queAllUp/.test(location.href)){ //..........问题点赞
            $("#chatpageheader").html("点过赞的人");
            getqueanswer();
        }
        else if(/redBag/.test(location.href)){//.............资源红包
            $("#chatpageheader").html("领红包的人");
            getanswer("redBag");
        }
        else{ //.............................................经验付费
            getanswer("allpay");
        }
    }
</script>
</body>
</html>